<%@taglib uri="/WEB-INF/struts-bean.tld"  prefix="bean"%>
<script language="JavaScript">
    function validate_Card_form(){
        var accountForm = document.AccountForm[0];
        if ( accountForm.namaCard.value == "" ){
            alert ( "<bean:message key="account.nama"/> "+isEmpty);
        }else if ( accountForm.noCard.value == "" ){
            alert ( "<bean:message key="account.kartu"/> "+isEmpty);
        }else{
            accountForm.submit();
        }
    }

    function validate_Relation_form(){
        var accountForm = document.AccountForm[1];
        if ( accountForm.namaRelation.value == "" ){
            alert ( "<bean:message key="account.nama"/> <bean:message key="account.relasi"/> "+isEmpty);
        }else if ( accountForm.umur.value == "" ){
            alert ( "<bean:message key="account.umur"/> "+isEmpty);
        }else if ( accountForm.relasi.value == "" ){
            alert ( "<bean:message key="account.relasi"/> "+isEmpty);
        }else{
            accountForm.submit();
        }
    }

    function validate_form(){
        var accountForm = document.AccountForm[2];
        if ( accountForm.kode.value == "" ){
            alert ( "<bean:message key="account.kode"/> "+isEmpty);
        }else if ( accountForm.nama.value == "" ){
            alert ( "<bean:message key="account.nama"/> "+isEmpty);
        }else if ( accountForm.alamat.value == "" ){
            alert ( "<bean:message key="account.alamat"/> "+isEmpty);
        }else if ( accountForm.telp.value == "" ){
            alert ( "<bean:message key="account.telp"/> "+isEmpty);
        }else if ( accountForm.statusJabatan.value == "" ){
            alert ( "<bean:message key="account.jabatan"/> "+isEmpty);
        }else{
            accountForm.submit();
        }
    }
</script>


